/*
 * THE SOURCE CODES OF THE SOFTWARE ARE VALUABLE ASSETS OF FIDUS TECHNOLOGIES LTD.
 * YOU AGREE TO KEEP ALL SOURCE CODES OF THE SOFTWARE IN CONFIDENCE. YOU MAY NOT TRANSFER
 * OR ASSIGN THE SOFTWARE OR YOUR RIGHTS UNDER THIS AGREEMENT.
 * LIMITED WARRANTY
 * THE SOFTWARE AND ACCOMPANYING WRITTEN MATERIALS (INCLUDING INSTRUCTIONS FOR USE) ARE PROVIDED "AS IS"
 * AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU ASSUME THE ENTIRE
 * RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE.
 * FIDUS TECHNOLOGIES DOES NOT WARRANT THAT THE SOFTWARE WILL MEET ALL YOUR REQUIREMENTS, THAT OPERATIONS
 * OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ALL SOFTWARE ERRORS WILL BE CORRECTED.
 * FIDUS TECHNOLOGIES-SOFTWARE SOLUTIONS IS NOT RESPONSIBLE FOR PROBLEMS CAUSED BY CHANGES IN THE
 * OPERATING CHARACTERISTICS OF COMPUTER HARDWARE OR COMPUTER OPERATING SYSTEMS WHICH ARE MADE AFTER
 * WHICH ARE MADE AFTER THE RELEASE OF THE SOFTWARE NOR FOR PROBLEMS IN THE INTERACTION OF THE SOFTWARE
 * WITH NON-FIDUS TECHNOLOGIES APPLICATION.WILL HAVE NO RESPONSIBILITY TO REPLACE OR REFUND THE LICENSE FEES
 * FOR MEDIA DAMAGED BY ACCIDENT, ABUSE OR MISAPPLICATION. THIS SOFTWARE IS INTENDED FOR COMMERCIAL,
 * INSTITUTIONAL, AND INDUSTRIAL USERS. THE ABOVE WARRANTIES ARE EXCLUSIVE AND IN LIEU OF ALL OTHER WARRANTIES,
 * WHETHER EXPRESSED OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE AND NON-INFRINGEMENT. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY FIDUS TECHNOLOGIES,
 * ITS EMPLOYEES, DISTRIBUTORS, DEALERS OR AGENTS SHALL INCREASE THE SCOPE OF THE ABOVE WARRANTIES OR
 * CREATE ANY NEW WARRANTIES. NEITHER FIDUS TECHNOLOGIES NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE
 * CREATION, PRODUCTION OR DELIVERY OF THE SOFTWARE SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL
 * OR INCIDENTAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS LOSSES, BUSINESS
 * INTERRUPTION, LOSS OF DATA, AND THE LIKE) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE,
 * OR ANY OTHER CLAIM BY ANY PARTY EVEN IF FIDUS TECHNOLOGIES HAS BEEN ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGES. IN THE EVENT FIDUS TECHNOLOGIES IS LIABLE FOR ANY DAMAGES, FIDUS TECHNOLOGIES' LIABILITY
 * FOR DAMAGES SHALL BE LIMITED TO THE AMOUNT PAID FOR THE SOFTWARE UNDER THE TERMS AND CONDITIONS OF THIS
 * AGREEMENT.
 * http://www.fidustechnologies.com
 * Copyright(C) 2010 FIDUS TECHNOLOGIES-Software Solutions(R)
 * All rights reserved.
 */

/*
 * MainScreen.java
 *
 * Created on 2 Sep, 2010, 3:06:10 PM
 */
package com.fidus.inventory.UI.docking;

import com.fidus.inventory.UI.Items.ItemDetailsView;
import com.fidus.inventory.UI.Items.SearchItem;
import com.fidus.inventory.UI.customer.CustomerDetailsView;
import com.fidus.inventory.UI.customer.SearchCustomer;
import com.fidus.inventory.UI.docking.util.CustomComponentFactory;
import com.fidus.inventory.UI.products.ProductDetailsView;
import com.fidus.inventory.UI.products.SearchProductView;
import com.fidus.inventory.UI.purchase.PurchaseDetailsView;
import com.fidus.inventory.UI.sale.SaleDetailsView;
import com.fidus.inventory.UI.sidePanel.SidePanel;
import com.fidus.inventory.UI.vendor.SearchVendor;
import com.fidus.inventory.UI.vendor.VendorDetailsView;
import javax.swing.JLabel;
import org.jdesktop.swingx.JXFrame;
import org.jdesktop.swingx.JXStatusBar;
import com.fidus.inventory.login.ApplicationUser;
import com.javadocking.DockingManager;
import com.javadocking.dock.BorderDock;
import com.javadocking.dock.Position;
import com.javadocking.dock.SplitDock;
import com.javadocking.dock.TabDock;
import com.javadocking.dock.docker.BorderDocker;
import com.javadocking.dock.factory.ToolBarDockFactory;
import com.javadocking.dockable.DefaultDockable;
import com.javadocking.dockable.Dockable;
import com.javadocking.dockable.DockableState;
import com.javadocking.dockable.StateActionDockable;
import com.javadocking.dockable.action.DefaultDockableStateAction;
import com.javadocking.dockable.action.DefaultDockableStateActionFactory;
import com.javadocking.model.DefaultDockingPath;
import com.javadocking.model.DockingPath;
import com.javadocking.model.FloatDockModel;
import com.javadocking.visualizer.DockingMinimizer;
import com.javadocking.visualizer.FloatExternalizer;
import com.javadocking.visualizer.SingleMaximizer;
import com.nilo.plaf.nimrod.NimRODLookAndFeel;
import com.nilo.plaf.nimrod.NimRODTheme;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Mahesh Kedari<mahesh.kedari@fidustechnologies.com>
 */
public class MainScreen extends JXFrame { 
    public static MainScreen selfObject;
    //<editor-fold defaultstate="collapsed" desc="Main Constructor">
    /** Creates new form MainScreen */
    public MainScreen(ApplicationUser applicationUser) {
        selfObject = this;
        this.applicationUser = applicationUser;
        setLookAndFeel();
        initComponents();
        setExtendedState(JXFrame.MAXIMIZED_BOTH);       
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        double width = dimension.getWidth();
        leftDivisionSize = (int)(width* 0.19);
        rightDivisonSize = (int)(width*0.87);
        initialiseDockingFramework();
        this.setVisible(true);
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Create Status Bar">
    private void createStatusBar() {
        /************************* For Status Bar please alter below code *************************/
        // Status Label will be used in setBusy function;
        statusLabel = new JLabel("Ready");
        jXStatusBar2.add(statusLabel, JXStatusBar.Constraint.ResizeBehavior.FILL);
        // Authenticated User name will be set on this label
        JLabel authLabel = new JLabel("<HTML>Authenticated User : <B>" + applicationUser.getUserName() + "</B></HTML>");
        jXStatusBar2.add(authLabel);
        // Busy Label will be in setBusy Function;
        busyLabel = new org.jdesktop.swingx.JXBusyLabel();

        busyLabel.setSize(20, 20);
        busyLabel.setVisible(true);
        busyLabel.setBusy(false);
        jXStatusBar2.add(busyLabel);
        //this.createStatusBar(statusBar);
        /************************* Status Bar End *********************************/
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Dock Initialisation">
    private void initialiseDockingFramework() {
        dockModel.addOwner("BizzLogic", this);

        // Give the callableComponent model to the docking manager.
        DockingManager.setDockModel(dockModel);
        // Set our custom component factory.
        DockingManager.setComponentFactory(new CustomComponentFactory());
        System.out.println("Stage 1: Fine");
        // Initialise all the docking sections
        initSearchDockables();
        initSidebarDockables();
        initCenterDockables();

        // Add Search Dock group to center split dock
        centerSplitDock.addChildDock(leftTabbedDock,new Position(Position.LEFT));
        // Add editor Dock group to center split dock
        centerSplitDock.addChildDock(centerTabbedDock, new Position(Position.CENTER));
        centerSplitDock.setDividerLocation(leftDivisionSize);

        // Add above centerSplitDock to main Split dock
        mainSplitDock.addChildDock(centerSplitDock, new Position(Position.CENTER));
        mainSplitDock.addChildDock(rightTabbedDock, new Position(Position.RIGHT));
        mainSplitDock.setDividerLocation(rightDivisonSize);

        // Add the root callableComponent to the callableComponent model.
        dockModel.addRootDock("mainSplitDock", mainSplitDock, this);

        // Create a maximizer and add it to the dock model.
        SingleMaximizer maximizePanel = new SingleMaximizer(mainSplitDock);
        dockModel.addVisualizer("maximizer", maximizePanel, this);

        // Create a docking minimizer and add it to the dock model.
        BorderDock minimizerBorderDock = new BorderDock(new ToolBarDockFactory());
        minimizerBorderDock.setMode(BorderDock.MODE_MINIMIZE_BAR);
        minimizerBorderDock.setCenterComponent(maximizePanel);
        BorderDocker borderDocker = new BorderDocker();
        borderDocker.setBorderDock(minimizerBorderDock);
        DockingMinimizer minimizer = new DockingMinimizer(borderDocker);
        dockModel.addVisualizer("minimizer", minimizer, this);

        dockModel.addVisualizer("externalizer", new FloatExternalizer(this), this);
        // Set our custom component factory.
        //DockingManager.setComponentFactory(new CustomComponentFactory());
        for (int index = 0; index < SEARCH_DOCKABLE_COUNT; index++) {
            addDockingPath(searchDockables.get(index));
        }
        for (int index = 0; index < CENTER_DOCKABLE_COUNT; index++) {
            addDockingPath(centerDockables.get(index));
        }
        jPanel1.add(minimizerBorderDock, BorderLayout.CENTER);
    }
    /*
     * Initialisation of Search Dockables
     */
    private void initSearchDockables() {
        /* Creating dockables for All search panels*/
        searchDockables.add(new SearchDockable("BuyerSearch", new SearchCustomer(), "Buyer", null, NORMAL));
        searchDockables.add(new SearchDockable("ProductSearch", new SearchProductView(), "Product", null, NORMAL));
        searchDockables.add(new SearchDockable("VendorSearch", new SearchVendor(), "Vendor", null, NORMAL));
        searchDockables.add(new SearchDockable("ItemSearch", new SearchItem(), "Items", null, NORMAL));
        SEARCH_DOCKABLE_COUNT = searchDockables.size();
        /* Adding newly created search panels */
        for (int index = 0; index < SEARCH_DOCKABLE_COUNT; index++) {
            // All actions.
            searchDockables.set(index, addAllActions(searchDockables.get(index)));
            leftTabbedDock.addDockable(searchDockables.get(index), new Position(index));            
        }
    }

    /*
     * Initialisation of Sidebar Dockables
     */
    private void initSidebarDockables() {
        /*
         * Creating dockables for all properties Dock.
         */
        propertiesDockable = new PropertiesDockable("Shortcuts", new SidePanel(), "Shortcuts", null);
        /* Adding newly created Properties Dockables to Right side panel*/
        propertiesDockable = addAllActions(propertiesDockable);
        rightTabbedDock.addDockable(propertiesDockable, new Position(0));
    }

    
    /*
     * Initialising Central dockables
     */
    private void initCenterDockables() {
        /*
         * Creating dockables for all editors.
         */
        centerDockables.add(new DefaultDockable("Sales: ", new SaleDetailsView(), "Sales: ", null));
        centerDockables.add(new DefaultDockable("Customer: ", new CustomerDetailsView(), "Customer: ", null));
        centerDockables.add(new DefaultDockable("Vendor: ", new VendorDetailsView(), "Vendor: ", null));
        centerDockables.add(new DefaultDockable("Item: ", new ItemDetailsView(), "Item: ", null));
        centerDockables.add(new DefaultDockable("Product: ", new ProductDetailsView(), "Product: ", null));
        centerDockables.add(new DefaultDockable("Purchase: ", new PurchaseDetailsView(), "Purchase:", null));
        CENTER_DOCKABLE_COUNT= centerDockables.size();
        /* Adding newly created dockables to center tabbed dock*/
        for (int index = 0; index < CENTER_DOCKABLE_COUNT; index++) {
            // All actions.
            centerDockables.set(index,addAllActions(centerDockables.get(index)));
            centerTabbedDock.addDockable(centerDockables.get(index), new Position(index));
        }
        centerTabbedDock.setSelectedDockable(centerDockables.get(0));
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Add Dockable Actions">
    private Dockable addAllActions(Dockable dockable) {
        Dockable wrapper = new StateActionDockable(dockable, new DefaultDockableStateActionFactory(), DockableState.statesClosed());
        wrapper = new StateActionDockable(wrapper, new DefaultDockableStateActionFactory(), DockableState.statesAllExceptClosed());
        return wrapper;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Add Docking Path">
    private DockingPath addDockingPath(Dockable dockable) {
        if (dockable.getDock() != null) {
            // Create the docking path of the dockable.
            DockingPath dockingPath = DefaultDockingPath.createDockingPath(dockable);
            DockingManager.getDockingPathModel().add(dockingPath);
            return dockingPath;
        }
        return null;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="Check and get the docked component">
    /**
     * This function will search which component calling function is expecting.
     * It will search that component with its type and component ID
     */
    public Component getDockedComponent(String componentType, String componentID){
        for (Dockable dockable : centerDockables) {
            if(dockable.getID().equals(componentType+": "+componentID)){
                new DefaultDockableStateAction(dockable,DockableState.NORMAL).actionPerformed(
                    new ActionEvent(this, ActionEvent.ACTION_PERFORMED, componentType+": "+componentID));
                return dockable.getContent();
            }
        }
        return createNewDockable(componentType, componentID);
    }
    private Component createNewDockable(String componentType, String componentID){
        Component component=null;
        if("Sales".equals(componentType)){
            component = new SaleDetailsView();
        }else if("Customer".equals(componentType)){
            component = new CustomerDetailsView();
        }else if("Vendor".equals(componentType)){
            component = new VendorDetailsView();
        }else if("Item".equals(componentType)){
            component = new ItemDetailsView();
        }else if("Product".equals(componentType)){
            component = new ProductDetailsView();
        }else if("Purchase".equals(componentType)){
            component = new PurchaseDetailsView();
        }
        if(component!=null){
            Dockable dockable = new DefaultDockable(componentType+": "+componentID, component, componentType+": "+componentID, null);
            centerDockables.add(dockable);
            dockable = addAllActions(dockable);
            CENTER_DOCKABLE_COUNT = centerDockables.size();
            centerTabbedDock.addDockable(dockable, new Position(centerTabbedDock.getDockableCount()));
            centerTabbedDock.setSelectedDockable(dockable);
            new DefaultDockableStateAction(dockable,DockableState.NORMAL).actionPerformed(
                    new ActionEvent(this, ActionEvent.ACTION_PERFORMED, componentType+": "+componentID));
            return dockable.getContent();
        }
        return component;
    }
    //</editor-fold>
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPopupMenu1 = new javax.swing.JPopupMenu();
        jXTitledPanel1 = new org.jdesktop.swingx.JXTitledPanel();
        jPanel2 = new javax.swing.JPanel();
        jXTaskPaneContainer1 = new org.jdesktop.swingx.JXTaskPaneContainer();
        jXTaskPane1 = new org.jdesktop.swingx.JXTaskPane();
        jXHyperlink1 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink2 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink3 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink4 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink5 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink6 = new org.jdesktop.swingx.JXHyperlink();
        jXTaskPane2 = new org.jdesktop.swingx.JXTaskPane();
        jXHyperlink7 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink8 = new org.jdesktop.swingx.JXHyperlink();
        jXHyperlink9 = new org.jdesktop.swingx.JXHyperlink();
        jXTaskPane3 = new org.jdesktop.swingx.JXTaskPane();
        jXTaskPane4 = new org.jdesktop.swingx.JXTaskPane();
        jXStatusBar2 = new org.jdesktop.swingx.JXStatusBar();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        utilitiesMenu = new javax.swing.JMenu();
        calculatorMenuItem = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JPopupMenu.Separator();
        importDatabaseMenuItem = new javax.swing.JMenuItem();
        exportDatabaseMenuItem = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JPopupMenu.Separator();
        printSetupMenuItem = new javax.swing.JMenuItem();
        networkMenuItem = new javax.swing.JMenuItem();
        jSeparator13 = new javax.swing.JPopupMenu.Separator();
        exitMenuItem = new javax.swing.JMenuItem();
        entriesMenu = new javax.swing.JMenu();
        customerMenuItem = new javax.swing.JMenuItem();
        vendorMenuItem = new javax.swing.JMenuItem();
        jSeparator5 = new javax.swing.JPopupMenu.Separator();
        itemsMenuItem = new javax.swing.JMenuItem();
        productsMenuItem = new javax.swing.JMenuItem();
        jSeparator10 = new javax.swing.JPopupMenu.Separator();
        transportMenuItem = new javax.swing.JMenuItem();
        transactionMenu = new javax.swing.JMenu();
        purchaseMenu = new javax.swing.JMenu();
        purchaseOrderMenuItem = new javax.swing.JMenuItem();
        receiveStockMenuItem = new javax.swing.JMenuItem();
        payOrderMenuItem = new javax.swing.JMenuItem();
        stockReturnMenuItem = new javax.swing.JMenuItem();
        jSeparator8 = new javax.swing.JPopupMenu.Separator();
        purchaseQuoteMenuItem = new javax.swing.JMenuItem();
        quoteCompareMenuItem = new javax.swing.JMenuItem();
        saleMenu = new javax.swing.JMenu();
        saleQuoteMenuItem = new javax.swing.JMenuItem();
        newOrderMenuItem = new javax.swing.JMenuItem();
        processOrderMenuItem = new javax.swing.JMenuItem();
        invoiceOrderMenuItem = new javax.swing.JMenuItem();
        orderWOinvoiceMenuItem = new javax.swing.JMenuItem();
        stockMenu = new javax.swing.JMenu();
        stockCheckMenuItem = new javax.swing.JMenuItem();
        manageStockMenuItem = new javax.swing.JMenuItem();
        stockTransferMenuItem = new javax.swing.JMenuItem();
        reorderMenu = new javax.swing.JMenu();
        viewRPMenuItem = new javax.swing.JMenuItem();
        setRPMenuItem = new javax.swing.JMenuItem();
        jSeparator7 = new javax.swing.JPopupMenu.Separator();
        setReorderActionMenuItem = new javax.swing.JMenuItem();
        reportsMenu = new javax.swing.JMenu();
        posMenu = new javax.swing.JMenu();
        settingsMenu = new javax.swing.JMenu();
        companySettingsMenuItem = new javax.swing.JMenuItem();
        jSeparator9 = new javax.swing.JPopupMenu.Separator();
        taxRateMenuItem = new javax.swing.JMenuItem();
        discountSettingsMenuItem = new javax.swing.JMenuItem();
        jSeparator11 = new javax.swing.JPopupMenu.Separator();
        userSettingsMenuItem = new javax.swing.JMenuItem();
        bankingMenu = new javax.swing.JMenu();
        chequeTxnMenu = new javax.swing.JMenu();
        chequeAcceptMenuItem = new javax.swing.JMenuItem();
        chequeIssueMenuItem = new javax.swing.JMenuItem();
        cashTxnMenu = new javax.swing.JMenu();
        cashAcceptMenuItem = new javax.swing.JMenuItem();
        cashIssueMenuItem = new javax.swing.JMenuItem();
        jSeparator6 = new javax.swing.JPopupMenu.Separator();
        bankDetailsMenuItem = new javax.swing.JMenuItem();
        voucherEntryMenu = new javax.swing.JMenu();
        creditVoucherMenuItem = new javax.swing.JMenuItem();
        debitVoucherMenuItem = new javax.swing.JMenuItem();
        financeMenu = new javax.swing.JMenu();
        eomMenuItem = new javax.swing.JMenuItem();
        eoyMenuItem = new javax.swing.JMenuItem();
        userMenu = new javax.swing.JMenu();
        manageUsersMenuItem = new javax.swing.JMenuItem();
        credentialsMenuItem = new javax.swing.JMenuItem();
        jSeparator12 = new javax.swing.JPopupMenu.Separator();
        accessControlMenuItem = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        helpCenterMenuItem = new javax.swing.JMenuItem();
        checkUpdatesMenuItem = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        webMenuItem = new javax.swing.JMenuItem();
        aboutProductMenuItem = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        aboutFidusMenuItem = new javax.swing.JMenuItem();

        jPopupMenu1.setAutoscrolls(true);
        jPopupMenu1.setName("jPopupMenu1"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(simple_inventory.Simple_InventoryApp.class).getContext().getResourceMap(MainScreen.class);
        jXTitledPanel1.setTitle(resourceMap.getString("jXTitledPanel1.title")); // NOI18N
        jXTitledPanel1.setName("jXTitledPanel1"); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 176, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 373, Short.MAX_VALUE)
        );

        jXTaskPaneContainer1.setName("jXTaskPaneContainer1"); // NOI18N

        jXTaskPane1.setCollapsed(true);
        jXTaskPane1.setTitle(resourceMap.getString("jXTaskPane1.title")); // NOI18N
        jXTaskPane1.setName("jXTaskPane1"); // NOI18N

        jXHyperlink1.setText(resourceMap.getString("jXHyperlink1.text")); // NOI18N
        jXHyperlink1.setName("jXHyperlink1"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink1);

        jXHyperlink2.setText(resourceMap.getString("jXHyperlink2.text")); // NOI18N
        jXHyperlink2.setName("jXHyperlink2"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink2);

        jXHyperlink3.setText(resourceMap.getString("jXHyperlink3.text")); // NOI18N
        jXHyperlink3.setName("jXHyperlink3"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink3);

        jXHyperlink4.setText(resourceMap.getString("jXHyperlink4.text")); // NOI18N
        jXHyperlink4.setName("jXHyperlink4"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink4);

        jXHyperlink5.setText(resourceMap.getString("jXHyperlink5.text")); // NOI18N
        jXHyperlink5.setName("jXHyperlink5"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink5);

        jXHyperlink6.setText(resourceMap.getString("jXHyperlink6.text")); // NOI18N
        jXHyperlink6.setName("jXHyperlink6"); // NOI18N
        jXTaskPane1.getContentPane().add(jXHyperlink6);

        jXTaskPaneContainer1.add(jXTaskPane1);

        jXTaskPane2.setCollapsed(true);
        jXTaskPane2.setTitle(resourceMap.getString("jXTaskPane2.title")); // NOI18N
        jXTaskPane2.setName("jXTaskPane2"); // NOI18N

        jXHyperlink7.setText(resourceMap.getString("jXHyperlink7.text")); // NOI18N
        jXHyperlink7.setName("jXHyperlink7"); // NOI18N
        jXTaskPane2.getContentPane().add(jXHyperlink7);

        jXHyperlink8.setText(resourceMap.getString("jXHyperlink8.text")); // NOI18N
        jXHyperlink8.setName("jXHyperlink8"); // NOI18N
        jXTaskPane2.getContentPane().add(jXHyperlink8);

        jXHyperlink9.setText(resourceMap.getString("jXHyperlink9.text")); // NOI18N
        jXHyperlink9.setName("jXHyperlink9"); // NOI18N
        jXTaskPane2.getContentPane().add(jXHyperlink9);

        jXTaskPaneContainer1.add(jXTaskPane2);

        jXTaskPane3.setCollapsed(true);
        jXTaskPane3.setTitle(resourceMap.getString("jXTaskPane3.title")); // NOI18N
        jXTaskPane3.setName("jXTaskPane3"); // NOI18N
        jXTaskPaneContainer1.add(jXTaskPane3);

        jXTaskPane4.setCollapsed(true);
        jXTaskPane4.setTitle(resourceMap.getString("jXTaskPane4.title")); // NOI18N
        jXTaskPane4.setName("jXTaskPane4"); // NOI18N
        jXTaskPaneContainer1.add(jXTaskPane4);

        javax.swing.GroupLayout jXTitledPanel1Layout = new javax.swing.GroupLayout(jXTitledPanel1.getContentContainer());
        jXTitledPanel1.getContentContainer().setLayout(jXTitledPanel1Layout);
        jXTitledPanel1Layout.setHorizontalGroup(
            jXTitledPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXTitledPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jXTaskPaneContainer1, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE))
        );
        jXTitledPanel1Layout.setVerticalGroup(
            jXTitledPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jXTaskPaneContainer1, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
        );

        jPopupMenu1.add(jXTitledPanel1);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setStartPosition(org.jdesktop.swingx.JXFrame.StartPosition.CenterInScreen);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jXStatusBar2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jXStatusBar2.setName("jXStatusBar2"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setLayout(new java.awt.BorderLayout());
        jScrollPane1.setViewportView(jPanel1);

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        utilitiesMenu.setText(resourceMap.getString("utilitiesMenu.text")); // NOI18N
        utilitiesMenu.setName("utilitiesMenu"); // NOI18N

        calculatorMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));
        calculatorMenuItem.setText(resourceMap.getString("calculatorMenuItem.text")); // NOI18N
        calculatorMenuItem.setName("calculatorMenuItem"); // NOI18N
        utilitiesMenu.add(calculatorMenuItem);

        jSeparator3.setName("jSeparator3"); // NOI18N
        utilitiesMenu.add(jSeparator3);

        importDatabaseMenuItem.setText(resourceMap.getString("importDatabaseMenuItem.text")); // NOI18N
        importDatabaseMenuItem.setName("importDatabaseMenuItem"); // NOI18N
        utilitiesMenu.add(importDatabaseMenuItem);

        exportDatabaseMenuItem.setText(resourceMap.getString("exportDatabaseMenuItem.text")); // NOI18N
        exportDatabaseMenuItem.setName("exportDatabaseMenuItem"); // NOI18N
        utilitiesMenu.add(exportDatabaseMenuItem);

        jSeparator4.setName("jSeparator4"); // NOI18N
        utilitiesMenu.add(jSeparator4);

        printSetupMenuItem.setText(resourceMap.getString("printSetupMenuItem.text")); // NOI18N
        printSetupMenuItem.setName("printSetupMenuItem"); // NOI18N
        utilitiesMenu.add(printSetupMenuItem);

        networkMenuItem.setText(resourceMap.getString("networkMenuItem.text")); // NOI18N
        networkMenuItem.setEnabled(false);
        networkMenuItem.setName("networkMenuItem"); // NOI18N
        utilitiesMenu.add(networkMenuItem);

        jSeparator13.setName("jSeparator13"); // NOI18N
        utilitiesMenu.add(jSeparator13);

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(simple_inventory.Simple_InventoryApp.class).getContext().getActionMap(MainScreen.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        utilitiesMenu.add(exitMenuItem);

        jMenuBar1.add(utilitiesMenu);

        entriesMenu.setText(resourceMap.getString("entriesMenu.text")); // NOI18N
        entriesMenu.setName("entriesMenu"); // NOI18N

        customerMenuItem.setText(resourceMap.getString("customerMenuItem.text")); // NOI18N
        customerMenuItem.setName("customerMenuItem"); // NOI18N
        entriesMenu.add(customerMenuItem);

        vendorMenuItem.setText(resourceMap.getString("vendorMenuItem.text")); // NOI18N
        vendorMenuItem.setName("vendorMenuItem"); // NOI18N
        entriesMenu.add(vendorMenuItem);

        jSeparator5.setName("jSeparator5"); // NOI18N
        entriesMenu.add(jSeparator5);

        itemsMenuItem.setText(resourceMap.getString("itemsMenuItem.text")); // NOI18N
        itemsMenuItem.setName("itemsMenuItem"); // NOI18N
        entriesMenu.add(itemsMenuItem);

        productsMenuItem.setText(resourceMap.getString("productsMenuItem.text")); // NOI18N
        productsMenuItem.setName("productsMenuItem"); // NOI18N
        entriesMenu.add(productsMenuItem);

        jSeparator10.setName("jSeparator10"); // NOI18N
        entriesMenu.add(jSeparator10);

        transportMenuItem.setText(resourceMap.getString("transportMenuItem.text")); // NOI18N
        transportMenuItem.setName("transportMenuItem"); // NOI18N
        entriesMenu.add(transportMenuItem);

        jMenuBar1.add(entriesMenu);

        transactionMenu.setText(resourceMap.getString("transactionMenu.text")); // NOI18N
        transactionMenu.setName("transactionMenu"); // NOI18N

        purchaseMenu.setText(resourceMap.getString("purchaseMenu.text")); // NOI18N
        purchaseMenu.setName("purchaseMenu"); // NOI18N

        purchaseOrderMenuItem.setText(resourceMap.getString("purchaseOrderMenuItem.text")); // NOI18N
        purchaseOrderMenuItem.setName("purchaseOrderMenuItem"); // NOI18N
        purchaseMenu.add(purchaseOrderMenuItem);

        receiveStockMenuItem.setText(resourceMap.getString("receiveStockMenuItem.text")); // NOI18N
        receiveStockMenuItem.setName("receiveStockMenuItem"); // NOI18N
        purchaseMenu.add(receiveStockMenuItem);

        payOrderMenuItem.setText(resourceMap.getString("payOrderMenuItem.text")); // NOI18N
        purchaseMenu.add(payOrderMenuItem);

        stockReturnMenuItem.setText(resourceMap.getString("stockReturnMenuItem.text")); // NOI18N
        stockReturnMenuItem.setName("stockReturnMenuItem"); // NOI18N
        purchaseMenu.add(stockReturnMenuItem);

        jSeparator8.setName("jSeparator8"); // NOI18N
        purchaseMenu.add(jSeparator8);

        purchaseQuoteMenuItem.setText(resourceMap.getString("purchaseQuoteMenuItem.text")); // NOI18N
        purchaseQuoteMenuItem.setName("purchaseQuoteMenuItem"); // NOI18N
        purchaseMenu.add(purchaseQuoteMenuItem);

        quoteCompareMenuItem.setText(resourceMap.getString("quoteCompareMenuItem.text")); // NOI18N
        quoteCompareMenuItem.setName("quoteCompareMenuItem"); // NOI18N
        purchaseMenu.add(quoteCompareMenuItem);

        transactionMenu.add(purchaseMenu);

        saleMenu.setText(resourceMap.getString("saleMenu.text")); // NOI18N
        saleMenu.setName("saleMenu"); // NOI18N

        saleQuoteMenuItem.setText(resourceMap.getString("saleQuoteMenuItem.text")); // NOI18N
        saleQuoteMenuItem.setName("saleQuoteMenuItem"); // NOI18N
        saleMenu.add(saleQuoteMenuItem);

        newOrderMenuItem.setText(resourceMap.getString("newOrderMenuItem.text")); // NOI18N
        newOrderMenuItem.setName("newOrderMenuItem"); // NOI18N
        saleMenu.add(newOrderMenuItem);

        processOrderMenuItem.setText(resourceMap.getString("processOrderMenuItem.text")); // NOI18N
        processOrderMenuItem.setName("processOrderMenuItem"); // NOI18N
        saleMenu.add(processOrderMenuItem);

        invoiceOrderMenuItem.setText(resourceMap.getString("invoiceOrderMenuItem.text")); // NOI18N
        invoiceOrderMenuItem.setName("invoiceOrderMenuItem"); // NOI18N
        saleMenu.add(invoiceOrderMenuItem);

        orderWOinvoiceMenuItem.setText(resourceMap.getString("orderWOinvoiceMenuItem.text")); // NOI18N
        orderWOinvoiceMenuItem.setName("orderWOinvoiceMenuItem"); // NOI18N
        saleMenu.add(orderWOinvoiceMenuItem);

        transactionMenu.add(saleMenu);

        jMenuBar1.add(transactionMenu);

        stockMenu.setText(resourceMap.getString("stockMenu.text")); // NOI18N
        stockMenu.setName("stockMenu"); // NOI18N

        stockCheckMenuItem.setText(resourceMap.getString("stockCheckMenuItem.text")); // NOI18N
        stockCheckMenuItem.setName("stockCheckMenuItem"); // NOI18N
        stockMenu.add(stockCheckMenuItem);

        manageStockMenuItem.setText(resourceMap.getString("manageStockMenuItem.text")); // NOI18N
        manageStockMenuItem.setName("manageStockMenuItem"); // NOI18N
        stockMenu.add(manageStockMenuItem);

        stockTransferMenuItem.setText(resourceMap.getString("stockTransferMenuItem.text")); // NOI18N
        stockTransferMenuItem.setEnabled(false);
        stockTransferMenuItem.setName("stockTransferMenuItem"); // NOI18N
        stockMenu.add(stockTransferMenuItem);

        reorderMenu.setText(resourceMap.getString("reorderMenu.text")); // NOI18N
        reorderMenu.setEnabled(false);
        reorderMenu.setName("reorderMenu"); // NOI18N

        viewRPMenuItem.setText(resourceMap.getString("viewRPMenuItem.text")); // NOI18N
        viewRPMenuItem.setName("viewRPMenuItem"); // NOI18N
        reorderMenu.add(viewRPMenuItem);

        setRPMenuItem.setText(resourceMap.getString("setRPMenuItem.text")); // NOI18N
        setRPMenuItem.setName("setRPMenuItem"); // NOI18N
        reorderMenu.add(setRPMenuItem);

        jSeparator7.setName("jSeparator7"); // NOI18N
        reorderMenu.add(jSeparator7);

        setReorderActionMenuItem.setText(resourceMap.getString("setReorderActionMenuItem.text")); // NOI18N
        setReorderActionMenuItem.setName("setReorderActionMenuItem"); // NOI18N
        reorderMenu.add(setReorderActionMenuItem);

        stockMenu.add(reorderMenu);

        jMenuBar1.add(stockMenu);

        reportsMenu.setText(resourceMap.getString("reportsMenu.text")); // NOI18N
        reportsMenu.setName("reportsMenu"); // NOI18N
        jMenuBar1.add(reportsMenu);

        posMenu.setText(resourceMap.getString("posMenu.text")); // NOI18N
        posMenu.setEnabled(false);
        posMenu.setName("posMenu"); // NOI18N
        jMenuBar1.add(posMenu);

        settingsMenu.setText(resourceMap.getString("settingsMenu.text")); // NOI18N
        settingsMenu.setName("settingsMenu"); // NOI18N

        companySettingsMenuItem.setText(resourceMap.getString("companySettingsMenuItem.text")); // NOI18N
        companySettingsMenuItem.setName("companySettingsMenuItem"); // NOI18N
        settingsMenu.add(companySettingsMenuItem);

        jSeparator9.setName("jSeparator9"); // NOI18N
        settingsMenu.add(jSeparator9);

        taxRateMenuItem.setText(resourceMap.getString("taxRateMenuItem.text")); // NOI18N
        taxRateMenuItem.setName("taxRateMenuItem"); // NOI18N
        settingsMenu.add(taxRateMenuItem);

        discountSettingsMenuItem.setText(resourceMap.getString("discountSettingsMenuItem.text")); // NOI18N
        discountSettingsMenuItem.setName("discountSettingsMenuItem"); // NOI18N
        settingsMenu.add(discountSettingsMenuItem);

        jSeparator11.setName("jSeparator11"); // NOI18N
        settingsMenu.add(jSeparator11);

        userSettingsMenuItem.setText(resourceMap.getString("userSettingsMenuItem.text")); // NOI18N
        userSettingsMenuItem.setName("userSettingsMenuItem"); // NOI18N
        settingsMenu.add(userSettingsMenuItem);

        jMenuBar1.add(settingsMenu);

        bankingMenu.setText(resourceMap.getString("bankingMenu.text")); // NOI18N
        bankingMenu.setEnabled(false);
        bankingMenu.setName("bankingMenu"); // NOI18N

        chequeTxnMenu.setText(resourceMap.getString("chequeTxnMenu.text")); // NOI18N
        chequeTxnMenu.setName("chequeTxnMenu"); // NOI18N

        chequeAcceptMenuItem.setText(resourceMap.getString("chequeAcceptMenuItem.text")); // NOI18N
        chequeAcceptMenuItem.setName("chequeAcceptMenuItem"); // NOI18N
        chequeTxnMenu.add(chequeAcceptMenuItem);

        chequeIssueMenuItem.setText(resourceMap.getString("chequeIssueMenuItem.text")); // NOI18N
        chequeIssueMenuItem.setName("chequeIssueMenuItem"); // NOI18N
        chequeTxnMenu.add(chequeIssueMenuItem);

        bankingMenu.add(chequeTxnMenu);

        cashTxnMenu.setText(resourceMap.getString("cashTxnMenu.text")); // NOI18N
        cashTxnMenu.setName("cashTxnMenu"); // NOI18N

        cashAcceptMenuItem.setText(resourceMap.getString("cashAcceptMenuItem.text")); // NOI18N
        cashAcceptMenuItem.setName("cashAcceptMenuItem"); // NOI18N
        cashTxnMenu.add(cashAcceptMenuItem);

        cashIssueMenuItem.setText(resourceMap.getString("cashIssueMenuItem.text")); // NOI18N
        cashIssueMenuItem.setName("cashIssueMenuItem"); // NOI18N
        cashTxnMenu.add(cashIssueMenuItem);

        bankingMenu.add(cashTxnMenu);

        jSeparator6.setName("jSeparator6"); // NOI18N
        bankingMenu.add(jSeparator6);

        bankDetailsMenuItem.setText(resourceMap.getString("bankDetailsMenuItem.text")); // NOI18N
        bankDetailsMenuItem.setName("bankDetailsMenuItem"); // NOI18N
        bankingMenu.add(bankDetailsMenuItem);

        voucherEntryMenu.setText(resourceMap.getString("voucherEntryMenu.text")); // NOI18N
        voucherEntryMenu.setName("voucherEntryMenu"); // NOI18N

        creditVoucherMenuItem.setText(resourceMap.getString("creditVoucherMenuItem.text")); // NOI18N
        creditVoucherMenuItem.setName("creditVoucherMenuItem"); // NOI18N
        voucherEntryMenu.add(creditVoucherMenuItem);

        debitVoucherMenuItem.setText(resourceMap.getString("debitVoucherMenuItem.text")); // NOI18N
        debitVoucherMenuItem.setName("debitVoucherMenuItem"); // NOI18N
        voucherEntryMenu.add(debitVoucherMenuItem);

        bankingMenu.add(voucherEntryMenu);

        financeMenu.setText(resourceMap.getString("financeMenu.text")); // NOI18N
        financeMenu.setName("financeMenu"); // NOI18N

        eomMenuItem.setText(resourceMap.getString("eomMenuItem.text")); // NOI18N
        eomMenuItem.setName("eomMenuItem"); // NOI18N
        financeMenu.add(eomMenuItem);

        eoyMenuItem.setText(resourceMap.getString("eoyMenuItem.text")); // NOI18N
        eoyMenuItem.setName("eoyMenuItem"); // NOI18N
        financeMenu.add(eoyMenuItem);

        bankingMenu.add(financeMenu);

        jMenuBar1.add(bankingMenu);

        userMenu.setText(resourceMap.getString("userMenu.text")); // NOI18N
        userMenu.setEnabled(false);
        userMenu.setName("userMenu"); // NOI18N

        manageUsersMenuItem.setText(resourceMap.getString("manageUsersMenuItem.text")); // NOI18N
        manageUsersMenuItem.setName("manageUsersMenuItem"); // NOI18N
        userMenu.add(manageUsersMenuItem);

        credentialsMenuItem.setText(resourceMap.getString("credentialsMenuItem.text")); // NOI18N
        credentialsMenuItem.setName("credentialsMenuItem"); // NOI18N
        userMenu.add(credentialsMenuItem);

        jSeparator12.setName("jSeparator12"); // NOI18N
        userMenu.add(jSeparator12);

        accessControlMenuItem.setText(resourceMap.getString("accessControlMenuItem.text")); // NOI18N
        accessControlMenuItem.setName("accessControlMenuItem"); // NOI18N
        userMenu.add(accessControlMenuItem);

        jMenuBar1.add(userMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        helpCenterMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        helpCenterMenuItem.setText(resourceMap.getString("helpCenterMenuItem.text")); // NOI18N
        helpCenterMenuItem.setName("helpCenterMenuItem"); // NOI18N
        helpMenu.add(helpCenterMenuItem);

        checkUpdatesMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
        checkUpdatesMenuItem.setText(resourceMap.getString("checkUpdatesMenuItem.text")); // NOI18N
        checkUpdatesMenuItem.setName("checkUpdatesMenuItem"); // NOI18N
        helpMenu.add(checkUpdatesMenuItem);

        jSeparator1.setName("jSeparator1"); // NOI18N
        helpMenu.add(jSeparator1);

        webMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
        webMenuItem.setText(resourceMap.getString("webMenuItem.text")); // NOI18N
        webMenuItem.setName("webMenuItem"); // NOI18N
        helpMenu.add(webMenuItem);

        aboutProductMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.ALT_MASK));
        aboutProductMenuItem.setText(resourceMap.getString("aboutProductMenuItem.text")); // NOI18N
        aboutProductMenuItem.setName("aboutProductMenuItem"); // NOI18N
        helpMenu.add(aboutProductMenuItem);

        jSeparator2.setName("jSeparator2"); // NOI18N
        helpMenu.add(jSeparator2);

        aboutFidusMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.CTRL_MASK));
        aboutFidusMenuItem.setText(resourceMap.getString("aboutFidusMenuItem.text")); // NOI18N
        aboutFidusMenuItem.setName("aboutFidusMenuItem"); // NOI18N
        helpMenu.add(aboutFidusMenuItem);

        jMenuBar1.add(helpMenu);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 835, Short.MAX_VALUE)
            .addComponent(jXStatusBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 835, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jXStatusBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        this.createStatusBar();

        pack();
    }// </editor-fold>//GEN-END:initComponents
    //<editor-fold defaultstate="collapsed" desc="NimRODTheme setup">
    private void setLookAndFeel() {
        NimRODTheme nimrodTheme = new NimRODTheme();
        nimrodTheme.setPrimary1(new Color(92, 170, 255));
        nimrodTheme.setPrimary2(new Color(123, 191, 255));
        nimrodTheme.setPrimary3(new Color(154, 212, 255));

        nimrodTheme.setSecondary1(new Color(220, 220, 220));
        nimrodTheme.setSecondary2(new Color(230, 230, 230));
        nimrodTheme.setSecondary3(new Color(240, 240, 240));
        nimrodTheme.setWhite(new Color(255, 255, 255));
        nimrodTheme.setBlack(Color.black);
        nimrodTheme.setMenuOpacity(195);
        nimrodTheme.setFrameOpacity(180);

        NimRODLookAndFeel.setCurrentTheme(nimrodTheme);
    }
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Editor-defined variables">
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem aboutFidusMenuItem;
    private javax.swing.JMenuItem aboutProductMenuItem;
    private javax.swing.JMenuItem accessControlMenuItem;
    private javax.swing.JMenuItem bankDetailsMenuItem;
    private javax.swing.JMenu bankingMenu;
    private javax.swing.JMenuItem calculatorMenuItem;
    private javax.swing.JMenuItem cashAcceptMenuItem;
    private javax.swing.JMenuItem cashIssueMenuItem;
    private javax.swing.JMenu cashTxnMenu;
    private javax.swing.JMenuItem checkUpdatesMenuItem;
    private javax.swing.JMenuItem chequeAcceptMenuItem;
    private javax.swing.JMenuItem chequeIssueMenuItem;
    private javax.swing.JMenu chequeTxnMenu;
    private javax.swing.JMenuItem companySettingsMenuItem;
    private javax.swing.JMenuItem credentialsMenuItem;
    private javax.swing.JMenuItem creditVoucherMenuItem;
    private javax.swing.JMenuItem customerMenuItem;
    private javax.swing.JMenuItem debitVoucherMenuItem;
    private javax.swing.JMenuItem discountSettingsMenuItem;
    private javax.swing.JMenu entriesMenu;
    private javax.swing.JMenuItem eomMenuItem;
    private javax.swing.JMenuItem eoyMenuItem;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenuItem exportDatabaseMenuItem;
    private javax.swing.JMenu financeMenu;
    private javax.swing.JMenuItem helpCenterMenuItem;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JMenuItem importDatabaseMenuItem;
    private javax.swing.JMenuItem invoiceOrderMenuItem;
    private javax.swing.JMenuItem itemsMenuItem;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator10;
    private javax.swing.JPopupMenu.Separator jSeparator11;
    private javax.swing.JPopupMenu.Separator jSeparator12;
    private javax.swing.JPopupMenu.Separator jSeparator13;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    private javax.swing.JPopupMenu.Separator jSeparator3;
    private javax.swing.JPopupMenu.Separator jSeparator4;
    private javax.swing.JPopupMenu.Separator jSeparator5;
    private javax.swing.JPopupMenu.Separator jSeparator6;
    private javax.swing.JPopupMenu.Separator jSeparator7;
    private javax.swing.JPopupMenu.Separator jSeparator8;
    private javax.swing.JPopupMenu.Separator jSeparator9;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink1;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink2;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink3;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink4;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink5;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink6;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink7;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink8;
    private org.jdesktop.swingx.JXHyperlink jXHyperlink9;
    private org.jdesktop.swingx.JXStatusBar jXStatusBar2;
    private org.jdesktop.swingx.JXTaskPane jXTaskPane1;
    private org.jdesktop.swingx.JXTaskPane jXTaskPane2;
    private org.jdesktop.swingx.JXTaskPane jXTaskPane3;
    private org.jdesktop.swingx.JXTaskPane jXTaskPane4;
    private org.jdesktop.swingx.JXTaskPaneContainer jXTaskPaneContainer1;
    private org.jdesktop.swingx.JXTitledPanel jXTitledPanel1;
    private javax.swing.JMenuItem manageStockMenuItem;
    private javax.swing.JMenuItem manageUsersMenuItem;
    private javax.swing.JMenuItem networkMenuItem;
    private javax.swing.JMenuItem newOrderMenuItem;
    private javax.swing.JMenuItem orderWOinvoiceMenuItem;
    private javax.swing.JMenuItem payOrderMenuItem;
    private javax.swing.JMenu posMenu;
    private javax.swing.JMenuItem printSetupMenuItem;
    private javax.swing.JMenuItem processOrderMenuItem;
    private javax.swing.JMenuItem productsMenuItem;
    private javax.swing.JMenu purchaseMenu;
    private javax.swing.JMenuItem purchaseOrderMenuItem;
    private javax.swing.JMenuItem purchaseQuoteMenuItem;
    private javax.swing.JMenuItem quoteCompareMenuItem;
    private javax.swing.JMenuItem receiveStockMenuItem;
    private javax.swing.JMenu reorderMenu;
    private javax.swing.JMenu reportsMenu;
    private javax.swing.JMenu saleMenu;
    private javax.swing.JMenuItem saleQuoteMenuItem;
    private javax.swing.JMenuItem setRPMenuItem;
    private javax.swing.JMenuItem setReorderActionMenuItem;
    private javax.swing.JMenu settingsMenu;
    private javax.swing.JMenuItem stockCheckMenuItem;
    private javax.swing.JMenu stockMenu;
    private javax.swing.JMenuItem stockReturnMenuItem;
    private javax.swing.JMenuItem stockTransferMenuItem;
    private javax.swing.JMenuItem taxRateMenuItem;
    private javax.swing.JMenu transactionMenu;
    private javax.swing.JMenuItem transportMenuItem;
    private javax.swing.JMenu userMenu;
    private javax.swing.JMenuItem userSettingsMenuItem;
    private javax.swing.JMenu utilitiesMenu;
    private javax.swing.JMenuItem vendorMenuItem;
    private javax.swing.JMenuItem viewRPMenuItem;
    private javax.swing.JMenu voucherEntryMenu;
    private javax.swing.JMenuItem webMenuItem;
    // End of variables declaration//GEN-END:variables
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="User Defined variables">
    private javax.swing.JLabel statusLabel;
    private org.jdesktop.swingx.JXBusyLabel busyLabel;
    /* Define workspace */
    private FloatDockModel dockModel = new FloatDockModel("workspace.dck");
    /* Define dock container */
    private SplitDock mainSplitDock = new SplitDock();
    private SplitDock centerSplitDock = new SplitDock();
    private static int leftDivisionSize;
    private static int rightDivisonSize;

    /* Define Search Dock Section */
    public static int SEARCH_DOCKABLE_COUNT = 0;
    private List<Dockable> searchDockables = new ArrayList<Dockable>();
    private TabDock leftTabbedDock= new TabDock();

    /* Define Center Dock Section*/
    private TabDock centerTabbedDock = new TabDock();
    public static int CENTER_DOCKABLE_COUNT = 0;
    private List<Dockable> centerDockables = new ArrayList<Dockable>();

    /* Define Properties Dock Section*/
    private PropertiesTabDock rightTabbedDock = new PropertiesTabDock();
    private Dockable propertiesDockable;

    private ApplicationUser applicationUser;
    //</editor-fold>    
}